scala_library(
    name = "test-deps",
    sources = [
        "com/twitter/finatra/kafkastreams/test/*.scala",
        "com/twitter/inject/*.scala",

        # The below entries are trying to achieve the same effect in Pants and Bazel.
        # This is taken in Pants; entry starting with ".." will be ignored by Bazel
        "../scala-kafka2.2/*.scala",
        # This is a bazel filegroup target, however, Pants will see this as a path to match files,
        # which would return nothing.
        "finatra/kafka-streams/kafka-streams/src/test/scala-kafka2.2:kafka-2.2",
    ],
    compiler_option_sets = ["fatal_warnings"],
    provides = scala_artifact(
        org = "com.twitter",
        name = "finatra-streams-tests",
        repo = artifactory,
    ),
    strict_deps = True,
    dependencies = [
        "3rdparty/jvm/com/google/inject:guice",
        "3rdparty/jvm/junit",
        "3rdparty/jvm/org/apache/kafka",
        "3rdparty/jvm/org/apache/kafka:kafka-clients",
        "3rdparty/jvm/org/apache/kafka:kafka-clients-test",
        "3rdparty/jvm/org/apache/kafka:kafka-streams-test",
        "3rdparty/jvm/org/apache/kafka:kafka-streams-test-utils",
        "3rdparty/jvm/org/apache/kafka:kafka-test",
        "3rdparty/jvm/org/apache/zookeeper:zookeeper-server",
        "3rdparty/jvm/org/scalatest",
        "finatra/inject/inject-core/src/main/scala/com/twitter/inject",
        "finatra/inject/inject-core/src/test/scala/com/twitter/inject",
        "finatra/inject/inject-slf4j/src/main/scala/com/twitter/inject",
        "finatra/kafka-streams/kafka-streams/src/main/scala",
        "finatra/kafka/src/test/scala:test-deps",
    ],
    exports = [
        "3rdparty/jvm/com/google/inject:guice",
        "3rdparty/jvm/junit",
        "3rdparty/jvm/org/apache/kafka",
        "3rdparty/jvm/org/apache/kafka:kafka-clients",
        "3rdparty/jvm/org/apache/kafka:kafka-clients-test",
        "3rdparty/jvm/org/apache/kafka:kafka-streams-test",
        "3rdparty/jvm/org/apache/kafka:kafka-streams-test-utils",
        "3rdparty/jvm/org/apache/kafka:kafka-test",
        "3rdparty/jvm/org/apache/zookeeper:zookeeper-server",
        "3rdparty/jvm/org/scalatest",
        "finatra/inject/inject-core/src/main/scala/com/twitter/inject",
        "finatra/inject/inject-core/src/test/scala/com/twitter/inject",
        "finatra/inject/inject-slf4j/src/main/scala/com/twitter/inject",
        "finatra/kafka-streams/kafka-streams/src/main/scala",
        "finatra/kafka/src/test/scala:test-deps",
    ],
)

junit_tests(
    sources = [
        "com/twitter/finatra/kafkastreams/integration/**/*.scala",
        "com/twitter/finatra/kafkastreams/query/**/*.scala",
        "com/twitter/finatra/kafkastreams/transformer/**/*.scala",
    ],
    compiler_option_sets = ["fatal_warnings"],
    strict_deps = True,
    dependencies = [
        "3rdparty/jvm/org/apache/kafka:kafka-clients-test",
        "3rdparty/jvm/org/apache/kafka:kafka-streams",
        "3rdparty/jvm/org/apache/kafka:kafka-streams-test",
        "3rdparty/jvm/org/apache/kafka:kafka-streams-test-utils",
        "3rdparty/jvm/org/apache/kafka:kafka-test",
        "3rdparty/jvm/org/apache/zookeeper:zookeeper-client",
        "3rdparty/jvm/org/apache/zookeeper:zookeeper-server",
        "3rdparty/jvm/org/mockito:mockito-core",
        "3rdparty/jvm/org/scalatestplus:junit",
        "3rdparty/jvm/org/scalatestplus:scalacheck",
        scoped(
            "3rdparty/jvm/org/slf4j:slf4j-simple",
            scope = "runtime",
        ),
        ":test-deps",
        "finatra/inject/inject-app/src/main/scala/com/twitter/inject/app",
        "finatra/inject/inject-core/src/main/scala/com/twitter/inject",
        "finatra/inject/inject-core/src/test/scala/com/twitter/inject",
        "finatra/inject/inject-server/src/main/scala/com/twitter/inject/server",
        "finatra/inject/inject-server/src/test/scala/com/twitter/inject/server",
        "finatra/inject/inject-slf4j/src/main/scala/com/twitter/inject",
        "finatra/jackson/src/test/scala/com/twitter/finatra/json",
        "finatra/kafka-streams/kafka-streams/src/main/scala",
        "finatra/kafka-streams/kafka-streams/src/test/resources",
        "finatra/kafka/src/main/java",
        "finatra/kafka/src/test/scala:test-deps",
        "finatra/thrift/src/test/scala/com/twitter/finatra/thrift",
        "util/util-mock/src/main/scala/com/twitter/util/mock",
    ],
)
